package game.leon.war.gate;

import game.leon.engine.net.GateServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.io.IOException;

/**
 * User: bianpeng
 * Date: 12-1-9
 * 面向内部
*/
@Component
public class WarGate {
    @Value("#{app.gate_port}")
    private int port;
    @Value("#{app.name}")
    private String name;
    @Autowired
    private GateReciever gateReciever;
    private GateServer gatewayServer = new GateServer();
    public void start() throws IOException {
        gatewayServer.start(port, gateReciever);
    }
}
